iDigi Logo
iDigi Device Connector API

Custom Objects

Custom Objects Schema

iDigi Account

This object contains the information necessary to connect to one of iDigi’s servers. It contains fields for the Username, Password and Server (developer.idigi.com, my.idigi.com, or my.idigi.co.uk), along with a Device Count field that is a roll-up summary for the count of related iDigi Device records. A trigger ensures that the Name field always takes the form of username@server.

This is the only object with user-entered data. All other objects are populated via method calls in Apex classes. Once an iDigi Account has iDigi Device records associated to it, the username and server fields cannot be modified.

iDigi Device

Each iDigi Device record has an iDigi Account record as its parent in a Master-Detail relationship. It represents an embedded device with the ability to make a direct connection to the iDigi server. The updateDeviceList() method of the DeviceCore class keeps the device list in sync with the iDigi server by updating the Description, Device Type and Location fields of each record. If someone deletes a device from an account on the iDigi server, the updateDeviceList() method will set the Inactive field of this record to True.

The record also has fields to report on the last attempt to update time-stamped data, with the DateTime of the last attempt stored in the "Dia Refresh" field and the outcome stored in the text field "Dia Status".

Dia Instance

Each iDigi Instance record has an iDigi Device record as its parent in a Lookup relationship. An "Instance" is simply a grouping of related Dia Channels. It contains a field for the Name and roll-up summaries for the Channel Count (number of related Dia Channels), Reading Count (number of readings on all channels) and Newest Reading (most recent DateTime of a reading on any channel in the instance).

Dia Channel

Each Dia Channel record has a Dia Instance record as its parent in a Master-Detail relationship. It contains fields for Name (name of the channel) and Units (what the readings measure) along with roll-up summaries for Reading Count (number of readings) and Newest Reading (most recent DateTime of a reading).

Dia Reading

Each Dia Reading record has a Dia Channel record as its parent in a Master-Detail relationship. It stores the actual reading in the Name field, and the DateTime of the reading in the Update Time field. Depending on the type of data stored in the server, one of the following fields is set: Boolean Value (0 or 1), Float Value (a Number(10, 8) field), Integer Value (a Number(18,0) field), Timestamp Value (another DateTime field).

The Historic ID field holds an external ID used to synchronize readings with the iDigi server. When checking for new readings, the Dia.loadChannelData() method always downloads readings with Historic IDs greater than the maximum ID stored in this table. To avoid re-downloading readings from the iDigi server, be sure to only delete Dia Readings with a Historic ID less than the maximum ID for that iDigi Device (see the Dia.getMaxHistoricId() method).

Back | Next

 

Digi Logo Small Copyright ©2012 Digi International Inc. All rights reserved.
90002179_A